<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<link rel="stylesheet" href="./swiper-bundle.css">
<style>
      html,
      body {
        position: relative;
        height: 100%;
      }

      body {
        background: #eee;
        font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
        font-size: 14px;
        color: #000;
        margin: 0;
        padding: 0;
      }

      .swiper {
        width: 100%;
        height: 100%;
            --swiper-theme-color: #ff6600;/* 设置Swiper风格 */
    --swiper-navigation-color: gold;/* 单独设置按钮颜色 */
    --swiper-navigation-size: 30px;/* 设置按钮大小 */
      }

      .swiper-slide {
        text-align: center;
        font-size: 18px;
        background: #fff;

        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      }

      .swiper-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    </style>
</head>

<body>
	  <div class="swiper mySwiper">
      <div class="swiper-wrapper">
        <div class="swiper-slide"><img src="C:\Users\Administrator\Desktop\毕设\img\满天星.jpg"></div>
        <div class="swiper-slide"><img src="C:\Users\Administrator\Desktop\毕设\img\玫瑰.jpg"></div>
        <div class="swiper-slide"><img src="C:\Users\Administrator\Desktop\毕设\img\月季.jpg"></div>
        <div class="swiper-slide"><img src="C:\Users\Administrator\Desktop\毕设\img\彼岸花.jpg"></div>
      </div>
        <div class="swiper-button-prev"></div><!--左箭头。如果放置在swiper外面，需要自定义样式。-->
    <div class="swiper-button-next"></div><!--右箭头。如果放置在swiper外面，需要自定义样式。-->
      <div class="swiper-pagination"></div>

    </div>

	<script type="text/javascript" src='./swiper-bundle.js'></script>
	<script>
      var swiper = new Swiper(".mySwiper", {
      	//一页里面放几个模块
      	 slidesPerView : 2,
      	 // 每个之间的间隔  在slide之间设置距离（单位px）。
      	 spaceBetween : 20,
      	//自动轮播属性
      	autoplay:true,
      	//无限循环
      	loop:true,
      	//分页器
        pagination: {
          el: ".swiper-pagination",
          clickable:true //点击小点 是否能点击
        },
        navigation: {
      	nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
      });
    </script>
</body>

</html>